<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
    <script>
        // 利用 new object 创建对象
       var obj = new Object()//创建了一个空的对象
       obj.uname = '刘亦菲'
       obj.age = 30;
       obj.sex = '女';
       obj.SayHi = function () {
           console.log('hi');
       }
       //我们是利用=号赋值的方法添加属性和方法
       //属性方法之间分号结束
       console.log(obj.uname);
       console.log(obj['age']);
       obj.SayHi()

     </script>
</head>
<body>
    
</body>
</html>